<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/mytaglib.tld" prefix="mytag" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<fmt:setBundle basename="ua.races.raceBundle"/>
<html>
<head><title>Bookmaker's page</title></head>
<body>
<c:set var="logoutText"><fmt:message key="logout"/></c:set>
<mytag:logout text="${logoutText}"/>

<mytag:stat history="5" align="center"/>

<c:set var="dateText"><fmt:message key="races.date"/></c:set>
<c:set var="submitText"><fmt:message key="bookmaker.submit"/></c:set>
<c:set var="titleText"><fmt:message key="bookmaker.text"/></c:set>
<c:set var="timeText"><fmt:message key="races.startTime"/></c:set>
<c:set var="actionText"><fmt:message key="races.action"/></c:set>
<c:set var="stadiumText"><fmt:message key="races.stadium"/></c:set>

<h2 align="center">${titleText}</h2>

<jsp:useBean id="races" type="java.util.List" scope="request"/>
<table align="center" summary="" border="1" bgcolor="#fff0f5">
    <thead bgcolor="#faebd7">
    <tr>
        <th>${dateText}</th>
        <th>${timeText}</th>
        <th>${stadiumText}</th>
        <th>${actionText}</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="race" items="${races}">
        <form action="prepareCoefs.do" method="GET">
            <tr>
                <td><input type="hidden" name="raceId" value="${race.raceId}"><c:out value="${race.raceDate}"/></td>
                <td><c:out value="${race.startTime}"/></td>
                <td><c:out value="${race.stadium}"/></td>
                <td><input type="submit" value="${submitText}"/></td>
            </tr>
        </form>
    </c:forEach>
    </tbody>
</table>



</body>
</html>